package com.project.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author lyl
 * description:
 */
@Controller
@RequestMapping("my") //进行命名空间设置防止url重名，其下方法真实访问路径为 my/访问名.html
public class MyController {
    @RequestMapping("add")
    public void test(HttpServletResponse response) {
        try {
            response.getWriter().println("hello");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
